package com.hadwinling.blog.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.hadwinling.blog.entity.Tag;
import com.hadwinling.blog.mapper.TagMapper;
import com.hadwinling.blog.service.TagService;

import java.util.List;

/**
 * @author HadwinLing
 * @version V1.0
 * @Package com.hadwinling.blog.service.impl
 * @date 2020/8/19 7:47
 */
@Service
public class TagServiceImpl implements TagService {

    @Resource
    private TagMapper tagMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return tagMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Tag record) {
        return tagMapper.insert(record);
    }

    @Override
    public int insertSelective(Tag record) {
        return tagMapper.insertSelective(record);
    }

    @Override
    public Tag selectByPrimaryKey(Integer id) {
        return tagMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Tag> selectAllByState(Integer state) {
        return tagMapper.selectAllByState(state);
    }

    @Override
    public List<Tag> selectAllByTopAndState(Integer top, Integer state) {
        return tagMapper.selectAllByTopAndState(top, state);
    }

    @Override
    public int updateByPrimaryKeySelective(Tag record) {
        return tagMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Tag record) {
        return tagMapper.updateByPrimaryKey(record);
    }

    @Override
    public int updateTopById(Integer updatedTop, Integer id) {
        return tagMapper.updateTopById(updatedTop, id);
    }

    @Override
    public int updateTagnumById(Integer updatedTagnum, Integer id) {
        return tagMapper.updateTagnumById(updatedTagnum, id);
    }


}




